package BankingApplication;

public class Transaction
{
	
	public enum TransactionType
	{
		WITHDRAWAL, DEPOSIT
	}
	
	private TransactionType type;
	private double amount;
	private int transID;
	private String description;
	private String payee;
	
	
	public Transaction(TransactionType type, double amt, int transID)
	{
		this.type = type;
		amount = amt;
		this.transID = transID;
	}
	
	public double doTransaction(TransactionType type, double balance)
	{
		if (type == TransactionType.WITHDRAWAL)
		{
			return balance - amount;
		}
		else
		{
			return balance + amount;
		}
	}
	
	public TransactionType getType()
	{
		return type;
	}
	
	public double getAmt()
	{
		return amount;
	}
	
	public int getID()
	{
		return transID;
	}
	
	public String getDescription()
	{
		return description;
	}
	
	public String getPayee()
	{
		return payee;
	}
	
	public void setDescription(String description)
	{
		this.description = description;
	}
	
	
	public void setPayee(String payee)
	{
		this.payee = payee;
	}

}
